import request from '@/utils/request'

//获取列表接口
export function getPeopleList(data) {
  return request({
    url: '/',
    method: 'get',
    params: data
  })
}

//删除功能
export function delPeople(id) {
  return request({
    url: `/${id}`,
    method: 'delete'
  })
}

//新增任务接口
export function addPeople(data) {
  return request({
    url: '/',
    method: 'post',
    data
  })
}

//获取任务详情
export function getPeopleContent(id) {
  return request({
    url: `/${id}`,
    method: 'get'
  })
}

//编辑任务详情
export function uploadTask(data) {
  return request({
    url: `/${data.id}`,
    method: 'put',
    data
  })
}

//搜索任务名称
export function searchName(data) {
  return request({
    url: '/',
    method: 'get',
    params: data
  })
}
